<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="index.js?a=1"></script>
</head>
<body>

</body>
<script>
	// 支持多个成功与失败回调
	const p = new Promise((resolve, reject) => {
		setTimeout(() => {
			// resolve(0)
			reject(1);
		}, 1000)
	})
	const p1 = p.then(value => {
		console.log("p1->成功值",value);
		return 200;
	},reason=>{
		console.log("p1->失败值",reason);
		return 100+reason;
	})
	
	const p2 = p.then(value => {
		console.log("p2->成功值",value);
		return 200;
	},reason=>{
		console.log("p2->失败值",reason);
		return 100+reason;
	})
	
	
	const p3 = p.then(value => {
		console.log("p3->成功值",value);
		return 200;
	},reason=>{
		console.log("p3->失败值",reason);
		return 100+reason;
	})
</script>
</html>